import { Component} from '@angular/core';
import { ToastController } from 'ionic-angular'

@Component({
  selector: 'actionsheet',
  templateUrl: 'actionsheet.html'
})
export class ActionsheetComponent {
  public mylist=[];
  public msg:string = '我是actionsheet的msg'

  constructor(
    public toastCtrl:ToastController
  ) {/*初始化触发*/
    for(var i=0;i<15;i++){
      this.mylist.push('这是第'+i+'个项目')
    }
  }

  goInfo(){
    this.showToast("top")
  }
  
  showToast(position:string){
    let toast = this.toastCtrl.create({
      message : '有什么好点的？',
      duration:2000,
      position:position
    })
    toast.present(toast)
  }

}
